//
//  SPMusicFormatDelegate.h
//  Sophie
//
//  Created by Anton Chebotaev on 19/11/09.
//  Copyright 2009 IFMO. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "SPMusicFormatToken.h"

@interface SPMusicFormatDelegate : NSObject <NSTokenFieldDelegate> {

}

#pragma mark NSTextFieldDelegate
// Allways returns NO
- (BOOL)tokenField:(NSTokenField *)tokenField hasMenuForRepresentedObject:(id)representedObject;

// Returns token's content
- (NSString *)tokenField:(NSTokenField *)tokenField editingStringForRepresentedObject:(id)representedObject;
- (NSString *)tokenField:(NSTokenField *)tokenField displayStringForRepresentedObject:(id)representedObject;
// Returns token's format
- (NSTokenStyle)tokenField:(NSTokenField *)tokenField styleForRepresentedObject:(id)representedObject;

// Completes string
- (NSArray *)tokenField:(NSTokenField *)tokenField completionsForSubstring:(NSString *)substring indexOfToken:(NSInteger)tokenIndex indexOfSelectedItem:(NSInteger *)selectedIndex;


// Generating tags
- (id)tokenField:(NSTokenField *)tokenField representedObjectForEditingString:(NSString *)editingString;

@end
